﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{

    public interface IExcelHelper
    {
        /// <summary>
        /// T想要打印的类名必须有ExportHelp特性
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="data"></param>
        /// <returns></returns>
        MemoryStream ExportXlsx<T>(List<T> data);

        /// <summary>
        /// 导入方法
        /// </summary>
        /// <typeparam name="T">属性拥有importHelp特性的类</typeparam>
        /// <param name="fileStream">Excel文件</param>
        /// <returns></returns>
        List<T> ImportToList<T>(Stream fileStream);
    }
}
